// import React from 'react'
import LazyLoad from 'react-lazyload';
import PropTypes from "prop-types";

// 图片懒加载
LazyLoadImage.propTypes = {
  src: PropTypes.string.isRequired,
  alt: PropTypes.string.isRequired,
};

function LazyLoadImage({ src, alt, ...props }) {
  return (
    <div>
       <LazyLoad height={200} offset={50}>
      <img src={src} alt={alt} {...props} />
    </LazyLoad>
    </div>
  )
}

export default LazyLoadImage

